package com.sanjiahantang.youjiarole.module.common.beans;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.sanjiahantang.youjiarole.base.BaseBean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by zy on 2017/9/14.
 */

public class ConditionBean extends BaseBean {

    private String data;

    public ArrayList<SelectorData> getData() {
        return new Gson().fromJson(data,new TypeToken<ArrayList<SelectorData>>() {}.getType());
    }

    public void setData(String data) {
        this.data = data;
    }

    private String addressData;

    public List<AddressData> getAddressData() {
        return new Gson().fromJson(data, new TypeToken<List<AddressData>>() {
        }.getType());
    }

    public void setAddressData(String addressData) {
        this.addressData = addressData;
    }


    public static class AddressData implements Serializable {

        private String address;

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }
    }

    public static class SelectorData implements Serializable{
        private String dicName;
        private int dicType;
        private String dicCode;
        private String dicValue;
        private int orderNum;
        private String parentId;
        private boolean isChecked;

        public String getDicName() {
            return dicName;
        }

        public void setDicName(String dicName) {
            this.dicName = dicName;
        }

        public boolean isChecked() {
            return isChecked;
        }

        public void setChecked(boolean checked) {
            isChecked = checked;
        }

        public String getName() {
            return dicName;
        }

        public void setName(String name) {
            this.dicName = name;
        }

        public int getId() {
            return dicType;
        }

        public void setId(int id) {
            this.dicType = id;
        }

        public String getDicCode() {
            return dicCode;
        }

        public void setDicCode(String dicCode) {
            this.dicCode = dicCode;
        }

        public String getDicValue() {
            return dicValue;
        }

        public void setDicValue(String dicValue) {
            this.dicValue = dicValue;
        }

        public int getOrderNum() {
            return orderNum;
        }

        public void setOrderNum(int orderNum) {
            this.orderNum = orderNum;
        }

        public String getParentId() {
            return parentId;
        }

        public void setParentId(String parentId) {
            this.parentId = parentId;
        }
    }


}
